﻿namespace UFIDA.U9.CUST.AITBarCodeBP
{
	using System;
	using System.Collections.Generic;
	using System.Text;
    using UFIDA.U9.CUST.AITBarCodeBP.utils;
    using UFSoft.UBF.AopFrame;	
	using UFSoft.UBF.Util.Context;

	/// <summary>
	/// GetBarCode partial 
	/// </summary>	
	public partial class GetBarCode 
	{	
		internal BaseStrategy Select()
		{
			return new GetBarCodeImpementStrategy();	
		}		
	}
	
	#region  implement strategy	
	/// <summary>
	/// Impement Implement
	/// 
	/// </summary>	
	internal partial class GetBarCodeImpementStrategy : BaseStrategy
	{
		public GetBarCodeImpementStrategy() { }

		public override object Do(object obj)
		{						
			GetBarCode bpObj = (GetBarCode)obj;

			if (bpObj.ID <= 0) throw new Exception("ID传入错误");

            string code = BarCodeUtils.GetBarcode(bpObj.ID);
			return code;
		}		
	}

	#endregion
	
	
}